package com.becca.cake.service.payment;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.dao.DataAccessException;

import com.becca.cake.core.exception.ServiceException;
import com.becca.cake.model.payment.InvoiceModel;
import com.becca.cake.model.payment.OrderRefundModel;
import com.becca.cake.model.payment.PaymentModel;

/**
 * 财务管理service接口
 * @copyright  尊星(上海)信息科技有限公司
 * @author yellow
 * @date 2016年5月20日 上午10:23:23
 */
public interface IPaymentService {
    /**
     * 财务查询列表数据
     * @param map
     * @return
     * @throws Exception
     */
    List<PaymentModel> selectPayments(Map<String, Object> map) throws Exception;

    /**
     * 获取财务查询列表总条数
     * @param map
     * @return
     * @throws Exception
     */
    Long selectPaymentsCount(Map<String, Object> map) throws Exception;

    /**
     * 查询发票列表数据
     * @param map
     * @return
     * @throws ServiceException
     */
    List<InvoiceModel> selectInvoices(Map<String, Object> map) throws ServiceException;

    /**
     * 查询发票总条数
     * @param map
     * @return
     * @throws ServiceException
     */
    Long selectInvoicesCount(Map<String, Object> map) throws ServiceException;

    /**
     * 批量修改是否已开票
     * @param map
     * @throws DataAccessException
     */
    void updIsReferenceInvoice(String jsonList) throws ServiceException;

    /**
     * 批量导出
     * @param list
     * @throws ServiceException
     */
    void exportInvoicesToExcel(HttpServletRequest request, HttpServletResponse response,
                               String orderIds) throws ServiceException;

    /**
     * 订单退款查询列表
     * @param map
     * @return
     * @throws ServiceException
     */
    List<OrderRefundModel> selectOrderRefunds(Map<String, Object> map) throws ServiceException;

    /**
     * 订单退款查询总条数
     * @param map
     * @return
     * @throws ServiceException
     */
    Long selectOrderRefundsCount(Map<String, Object> map) throws ServiceException;
}
